// router/index.js
import { createRouter, createWebHistory } from 'vue-router'

const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    {
      path: '/',
      name: 'home',
      component: () => import('../views/ShouyeView.vue'), // 使用懒加载并调整命名
    },
    {
      path: '/TypeScriptView',
      name: 'TypeScript',
      component: () => import('../views/TypeScriptView.vue'), // 已有懒加载，保持不变
    },
    {
      path: '/SpringCloudView',
      name: 'SpringCloud',
      component: () => import('../views/SpringCloudView.vue'), // 调整为懒加载
    },
  ],
})

export default router
